#include <iostream>
#include "guessNumber.h"

using namespace std;

int maxNumber = 9; // 最大值

int main()
{
    Init(); // 初始化
    cout << "猜数游戏开始！" << endl;

    do{
        getRandom();
        int guessRet;

        do{
            guessRet = judgeRight(input()); // 判断是否正确
            if (guessRet == 1) cout << "偏大" << endl;
            else if (guessRet == 2) cout << "偏小" << endl;
        }while (guessRet != 0);
        cout << "正确答案。" << endl;
    }while (confirmRetry()); // 用来决定是否再次游玩

    return 0;
}